Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Identifying the columns of a browse
Next, you need to know how to identify the columns in the Order browse. The browse is a single Progress object with its own handle, but the columns in the browse have handles as well. The browse acts as a container for those columns much as a frame does for the fields and other objects it contains.
To get the handle to the first column in a browse, you use its
FIRST-COLUMNattribute. The chain of columns is linked by theNEXT-COLUMNattribute of each column.This next block of code checks to see if the current object in the frame is a browse. If it is, then it moves the browse to the left by changing its
COLUMNattribute, and widens it by six characters by setting theWIDTH-CHARSattribute. It then walks through the columns, checking each one’s data type. If a column is a date, it widens it by four characters. You use the sameDO WHILE VALID-HANDLEblock header as for the frame itself to walk through all the columns in the browse:
Finally, you need to remember to move on to the next object in the frame before ending the original
DOblock:
If you forget this step, your procedure goes into an infinite loop when you run it, and you’ll need to press CTRL+BREAK to end it.
Figure 18–12 shows what you see when you run the window.
Figure 18–12: Updated sample window
![]()
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |